package cn.minsh.lims.eoms.modules.app.controller.req;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.mybatis.spring.annotation.MapperScan;

import javax.validation.constraints.*;
import java.util.Date;
import java.util.List;

/**
 * @author Administrator
 */
@Data
@ApiModel("保养工单")
public class MaintenanceOrderReq {

    @ApiModelProperty("保养工单id")
    private Long id ;
    @ApiModelProperty("保养工单名称")
    @Length(min = 1,max = 20,message = "限20个字符")
    @NotBlank(message = "保养工单名称不能为空")
    private String name ;
    @ApiModelProperty("保养范围，保养范围id(Long) 列表")
    @NotEmpty(message = "保养范围不能为空")
    private List<Long> scopeIdList ;
    @ApiModelProperty("保养类型：校准、检定等（字典维护）")
    @NotNull(message = "保养类型不能为空")
    private Integer level ;
    @ApiModelProperty("保养类型：1自主保养2委外保养")
    @NotNull(message = "保养类型不能为空")
    @Min(value = 1,message = "保养类型值为1和2")
    @Max(value = 2,message = "保养类型值为1和2")
    private Integer type ;
    @ApiModelProperty("供应商id，保养类型为委外保养有意义")
    private Long supplierId ;
    @ApiModelProperty("保养时间")
    @NotNull(message = "保养时间不能为空")
    private Date maintenanceTime ;
    @ApiModelProperty("经办人")
    @NotNull(message = "经办人不能为空")
    private Long agentId ;
    @ApiModelProperty("保养提醒，正整数列表")
    private List<Integer> remindList ;
    @ApiModelProperty("保养内容")
    @NotEmpty(message = "保养内容不能为空，字符串列表")
    private List<String> contentList ;
}
